package cn.wolfcode.shop.service;

import cn.wolfcode.shop.domian.OrderInfo;
import cn.wolfcode.shop.qo.OrderQueryObject;
import cn.wolfcode.shop.qo.PageResult;
import cn.wolfcode.shop.vo.CreateOrderVo;
import cn.wolfcode.shop.vo.OrderStatusChangeVo;

public interface IOrderInfoService {
    /**
     * 生成订单
     * @param token
     * @param createOrderVo
     * @return
     */
    OrderInfo generateOrder(Long userId, CreateOrderVo vo);

    PageResult query(OrderQueryObject qo);

    OrderInfo getById(Long id);

    /**
     * 改变订单状态
     * @param note
     * @param changeType
     * @param orderId
     * @return
     */
    void changeStatus(String note, Integer changeType, Long orderId);

    /**
     * 前台确认收货
     * @param id
     * @param orderStatusChangeVo
     */
    OrderInfo changeStatus(OrderStatusChangeVo orderStatusChangeVo);
}
